



<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>AcWing</title>
    

<meta charset="UTF-8">
<meta name="keywords" content="AcWing,Leetcode,题解,编程,算法"/>
<meta name="description" content="一个专属于程序员的平台，为大家在漫漫的刷题之旅中，提供最优质的解答"/>
<meta name="baidu-site-verification" content="UW1SBiMHO7" />
<meta name="google-site-verification" content="YTgbOq_0TDShJS6KTcUYCQoAAZTm308SJ7ibsafBD_Y" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" type="image/png" href="https://cdn.acwing.com/static/web/img/favicon.ico"/>
<link rel="stylesheet" href="https://cdn.acwing.com/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/web/node_modules/bootstrap-toggle/css/bootstrap-toggle.min.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/signform.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/jquery-ui-dist/jquery-ui.min.css">

    <link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/success_modal.css" />


    
        <link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/wss/chat/chat_list-0.0.1.css">
    

<!--link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/pace.css"-->
<!--script src="https://cdn.acwing.com/static/web/js/pace.js"></script-->
<script>
    let onbeforeunload_functions = [];
</script>


<style>
    /* latin */
    @font-face {
      font-family: 'Satisfy';
      font-style: normal;
      font-weight: 400;
      src: local('Satisfy Regular'), local('Satisfy-Regular'), url(https://cdn.acwing.com/static/web/fonts/rP2Hp2yn6lkG50LoCZOIHQ.woff2) format('woff2');
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }

    /* latin-ext */
    @font-face {
      font-family: 'Lato';
      font-style: italic;
      font-weight: 400;
      src: local('Lato Italic'), local('Lato-Italic'), url(https://cdn.acwing.com/static/web/fonts/S6u8w4BMUTPHjxsAUi-qJCY.woff2) format('woff2');
      unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    /* latin */
    @font-face {
      font-family: 'Lato';
      font-style: italic;
      font-weight: 400;
      src: local('Lato Italic'), local('Lato-Italic'), url(https://cdn.acwing.com/static/web/fonts/S6u8w4BMUTPHjxsAXC-q.woff2) format('woff2');
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
    /* latin-ext */
    @font-face {
      font-family: 'Lato';
      font-style: italic;
      font-weight: 700;
      src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://cdn.acwing.com/static/web/fonts/S6u_w4BMUTPHjxsI5wq_FQft1dw.woff2) format('woff2');
      unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    /* latin */
    @font-face {
      font-family: 'Lato';
      font-style: italic;
      font-weight: 700;
      src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://cdn.acwing.com/static/web/fonts/S6u_w4BMUTPHjxsI5wq_Gwft.woff2) format('woff2');
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
    /* latin-ext */
    @font-face {
      font-family: 'Lato';
      font-style: normal;
      font-weight: 400;
      src: local('Lato Regular'), local('Lato-Regular'), url(https://cdn.acwing.com/static/web/fonts/S6uyw4BMUTPHjxAwXjeu.woff2) format('woff2');
      unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    /* latin */
    @font-face {
      font-family: 'Lato';
      font-style: normal;
      font-weight: 400;
      src: local('Lato Regular'), local('Lato-Regular'), url(https://cdn.acwing.com/static/web/fonts/S6uyw4BMUTPHjx4wXg.woff2) format('woff2');
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
    /* latin-ext */
    @font-face {
      font-family: 'Lato';
      font-style: normal;
      font-weight: 700;
      src: local('Lato Bold'), local('Lato-Bold'), url(https://cdn.acwing.com/static/web/fonts/S6u9w4BMUTPHh6UVSwaPGR_p.woff2) format('woff2');
      unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
    }
    /* latin */
    @font-face {
      font-family: 'Lato';
      font-style: normal;
      font-weight: 700;
      src: local('Lato Bold'), local('Lato-Bold'), url(https://cdn.acwing.com/static/web/fonts/S6u9w4BMUTPHh6UVSwiPGQ.woff2) format('woff2');
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
    }
</style>
<script src="https://cdn.acwing.com/static/jquery/js/jquery-3.3.1.min.js"></script>
<script src="https://cdn.acwing.com/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="https://cdn.acwing.com/static/web/node_modules/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
<script src="https://cdn.acwing.com/static/jquery-ui-dist/jquery-ui.min.js"></script>
<script src="https://cdn.acwing.com/static/web/node_modules/jquery.cookie/jquery.cookie.js"></script>
<script>
    $(document).ready(function () {
        var csrftoken = $.cookie('csrftoken');

        function csrfSafeMethod(method) {
            // these HTTP methods do not require CSRF protection
            return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
        }

        $.ajaxSetup({
            beforeSend: function(xhr, settings) {
                if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
                    xhr.setRequestHeader("X-CSRFToken", csrftoken);
                }
            },
            cache: true
        });
    });
</script>
<script src="https://cdn.acwing.com/static/web/js/signform-0.0.1.js"></script>
<script src="https://cdn.acwing.com/static/web/js/handlebars-v1.3.0.js"></script>
<script src="https://cdn.acwing.com/static/web/js/effect_anchor-0.0.1.js"></script>
<script src="https://cdn.acwing.com/static/web/js/editor/utils-0.0.1.js"></script>

    <script>
    let chat_state = {
        me_id: 273120,
    };
</script>
<div style="display: none;">
    <div id="message_template_me">
        <div class="row" style="margin: 0; margin-bottom: 10px;">
            <div class="col-xs-2 pull-right" style="width: 30px; padding: 0; margin-right: 10px;">
                <a href="https://message_host_space_url">
                    <img class="img-responsive img-circle" width="30px" height="30px" src="https://www.acwing.com/static/web/img/favicon.ico" alt="我的头像">
                </a>
            </div>
            <div class="col-xs-10 pull-right">
                <span class="chat-bubble-me pull-right" style="word-break: break-all;">
                    message_content
                </span>
            </div>
        </div>
    </div>
    <div id="message_template_you">
        <div class="row" style="margin: 0; margin-bottom: 10px;">
            <div class="col-xs-2" style="width: 30px; padding: 0; margin-left: 10px;">
                <a href="https://message_host_space_url">
                    <img class="img-responsive img-circle" width="30px" height="30px" src="https://www.acwing.com/static/web/img/favicon.ico" alt="好友头像">
                </a>
            </div>
            <div class="col-xs-10">
                <span class="chat-bubble-you pull-left" style="word-break: break-all;">
                    message_content
                </span>
            </div>
        </div>
    </div>
    <div id="message_create_time">
        <div class="text-center">
            <span class="chat-time-format">message create time</span>
        </div>
        <br>
    </div>
    <div id="message_code_template">
        <a id="message_code_template_0_message_id_0" style="cursor:pointer;">
            <img src="https://cdn.acwing.com/static/web/img/chat/code.png" width="75px" style="margin: -17px -22px -14px -22px;" alt="代码">
        </a>
    </div>
    <div id="message_emoji_gif_template">
        <a style="cursor:pointer;">
            <img src="https://www.acwing.com/static/web/img/favicon.ico"
                 width="100px"
                 style="margin: 0"
                 title="emoji_gif_description"
                 alt="表情动画">
        </a>
    </div>
</div>
    <script src="https://cdn.acwing.com/static/web/js/wss/chat/utils.js"></script>



    <script src="https://cdn.acwing.com/static/web/third_party/ace-builds/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
    <script src="https://cdn.acwing.com/static/web/third_party/ace-builds/src-min-noconflict/ext-language_tools-0.0.1.js"></script>
    <script src="https://cdn.acwing.com/static/web/js/editor/code_completer/dist/code_completer-0.0.11.min.js"></script>
    <script src="https://cdn.acwing.com/static/web/js/wss/chat/emoji-data.js"></script>




<script>
    let user_state = {
        is_authenticated: true,
        is_pc: false,
        is_tablet: false,
        is_mobile: false,
    };
    if (user_state.is_authenticated){
        user_state.user_id = 273120;
        user_state.info = "";
    }
    
        user_state.is_pc = true;
    
</script>
<script>
    let GLOBAL_COMMENT_SONS = {};
</script>
<style>
    
        #acwing_body {
            background: white url("https://video.acwing.com/image/default/3F3A981B2C254D689179D90561B634D4-6-2.jpg?auth_key=1707955200-ac2824wing-0-2d3a1a0e7bbae225571a4a0e8da3f01a") fixed;
            background-size: auto;
        }
    

    
    @media (min-width: 768px) and (max-width: 1000px) {
       .collapse {
           display: none !important;
       }
    }
    .popover {
        z-index: 1000000 !important;
    }

    @media (min-width: 768px) {
      .container {
        width: 750px;
      }
    }
    @media (min-width: 992px) {
      .container {
        width: 900px;
      }
    }
    @media (min-width: 1200px) {
      .container {
        width: 1000px;
      }
    }

    @media (min-width: 1300px) {
      .container {
        width: 1170px;
      }
    }
</style>


<link rel="stylesheet" href="https://cdn.acwing.com/static/plugins/css/ace.min.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/martor/css/martor-0.0.2.min.css">

    <link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/martor-0.0.1.css">

<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/file_system/file/content/comment.css">


    <link rel ="stylesheet" href="https://cdn.acwing.com/static/web/css/style-0.0.18.css">

<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/base/navbar.css">

    

<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/file_system/gui/window/base-0.0.4.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/file_system/file/content/whole/application/file_explorer/base-0.0.2.css">
<link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/file_system/gui/taskbar/base-0.0.5.css">
<script>
    let DESKTOP_STATE_WINDOW_OPERATE_OPEN_URL = "/file_system/gui/window/operate/open/666/";
    let DESKTOP_STATE_TASKBAR_SEARCH_URL = "/file_system/gui/taskbar/search/base/search/";
    let DESKTOP_STATE_OS_THIRD_PARTY_API_OAUTH2_AUTHORIZE_URL = "/third_party/api/oauth2/acapp/authorize/";
</script>
<script src="https://cdn.acwing.com/static/web/js/file_system/file/content/whole/application/file_explorer/dist/file_explorer-0.0.7.min.js"></script>
<script src="https://cdn.acwing.com/static/web/js/file_system/gui/dist/gui-0.0.64.min.js"></script>
<script>
    $(document).ready(function () {
        let urls = {
            add: "/file_system/file/operation/content/add/",
            update: "/file_system/file/operation/content/update/",
            delete: "/file_system/file/operation/content/delete/",
            update_refactor_rename: "/file_system/file/operation/content/update/refactor/rename/",
            command_ls: "/file_system/file/operation/content/command/ls/",
            command_cp: "/file_system/file/operation/content/command/cp/",
            command_mv: "/file_system/file/operation/content/command/mv/",
            command_read: "/file_system/file/operation/content/command/read/",
        };
        desktop_state.os.builtin.api.file.operation.set(urls);

        let applications = {
            file_explorer: 284475,
            ac_editor: 172575,
            ac_saber: 118289,
            settings: 589618,
            ac_chat: 994425,
        };
        desktop_state.os.builtin.application.set(applications);

        let configs = {
            media_url: "https://cdn.acwing.com/media/",
            static_url: "https://cdn.acwing.com/static/",
        };
        desktop_state.os.builtin.settings.set(configs);

        let auto_open_apps = [];
        
            auto_open_apps.push({
                title: "AC Chat",
                icon: "https://cdn.acwing.com/media/file_system/file/application/icon/2220490481555590627-128_UQONKkk.png",
                file_id: 994425,
            });
        
        desktop_state.taskbar.widgets.apps.set(auto_open_apps);
    });
</script>


    
    


    <link rel="stylesheet" href="https://cdn.acwing.com/static/web/css/about/index-0.0.10.css" />


</head>
<body id="acwing_body" style="min-height: 100vh;">

 
    

<div class="panel panel-default fs-gui-taskbar"
        
            style="width: 100vw; "
        >
    <div class="panel-body fs-gui-taskbar-body dropup">
        <div class="panel panel-default fs-gui-taskbar-begin-menu">
    <div class="panel-body" style="padding: 0;">
        <div class="fs-gui-taskbar-begin-menu-item fs-gui-taskbar-begin-menu-item-file">
            文件
        </div>
        <div class="fs-gui-taskbar-begin-menu-item fs-gui-taskbar-begin-menu-item-application">
            应用
        </div>
        <hr style="height: 1vh; margin: 1vh;">
        <div class="fs-gui-taskbar-begin-menu-item fs-gui-taskbar-begin-menu-item-settings">
            设置
        </div>
    </div>
</div>
        <button class="fs-gui-taskbar-begin pull-left btn btn-default">
            <img src="https://cdn.acwing.com/static/web/img/favicon.ico" alt="开始" title="开始" style="width: 60%;" />
        </button>
        <div class="fs-gui-taskbar-search pull-left">
            <span class="glyphicon glyphicon-search fs-gui-taskbar-search-icon"></span>
            <label for="fs-gui-taskbar-search-field" class="sr-only"></label>
            <input id="fs-gui-taskbar-search-field" placeholder="在这里输入你要搜索的应用" />
        </div>
        <div class="fs-gui-taskbar-right">
            <div class="fs-gui-taskbar-task-list"></div>
            <div class="fs-gui-taskbar-widgets">
                <div class="fs-gui-taskbar-widgets-clock">
                    <div class="fs-gui-taskbar-widgets-clock-time">10:34</div>
                    <div class="fs-gui-taskbar-widgets-clock-date">2024-02-07</div>
                </div>
                <div class="fs-gui-taskbar-widgets-apps">
                    
                        <div class="fs-gui-taskbar-widgets-apps-item fs-gui-taskbar-widgets-apps-item-994425" title="AC Chat">
                            <img src="https://cdn.acwing.com/media/file_system/file/application/icon/2220490481555590627-128_UQONKkk.png" alt="AC Chat">
                        </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>


<div id="fs-gui-advertisement-base"
        style="position: fixed; top: 15vh; cursor: pointer; display: none; z-index:999999999">
    <div>
        <div id="fs-gui-advertisement-base-title"></div>
        <div style="text-align: left; font-size: 80%;">
            <span style="font-size: 80%;">¥</span>
            <span id="fs-gui-advertisement-base-price" style="font-size: 135%;"></span>&nbsp;&nbsp;&nbsp;&nbsp;
            <span id="fs-gui-advertisement-base-inventory" style="font-size: 135%;"></span> 份秒杀
            <span class="glyphicon glyphicon-triangle-right" style="font-size: 70%; top: 0.25vh"></span>
        </div>
        <div id="fs-gui-advertisement-base-close-btn"
                style="color: white; position: absolute; top: -0.4vh; right: 4px; cursor: pointer; font-size: 18px;">x</div>
    </div>
</div>


 
    

<style>
    .file-explorer-main-field-item-desktop:hover {
        background-color: rgba(204,232,255, 0.5);
    }
</style>

<div style="position: fixed; top: 71px; left: 17px;">
    <div class="file-explorer-main-field-item file-explorer-main-field-item-desktop" style="border: none"
        ondblclick="desktop_state.window.open_outer_window(desktop_state.os.builtin.application.applications.file_explorer,'main&address=~/');">
        <div class="file-explorer-main-field-item-icon">
            <img src="https://cdn.acwing.com/static/web/img/file_system/file/application/file_explorer/folder_icon.png" alt="文件图标"/>
        </div>
        <div class="file-explorer-main-field-item-title" style="color: white; font-size: 1.8vh; text-shadow: 3px 3px 3px grey;">文件</div>
    </div>
    <br>
    <div class="file-explorer-main-field-item file-explorer-main-field-item-desktop" style="border: none"
         ondblclick="desktop_state.window.open_outer_window(desktop_state.os.builtin.application.applications.file_explorer,'main&address=/我的空间/应用/');">
        <div class="file-explorer-main-field-item-icon">
            <img src="https://cdn.acwing.com/static/web/img/file_system/file/application/file_explorer/folder_icon.png" alt="文件图标"/>
        </div>
        <div class="file-explorer-main-field-item-title" style="color: white; font-size: 1.8vh; text-shadow: 3px 3px 3px grey;">应用</div>
    </div>
</div>


<div id="acwing_page" >
    <nav class="navbar navbar-inverse navbar-fixed-top navbar-expand-lg" style="z-index: 10;">
        <div class="container">
            <!-- Header -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#topNavBar">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    
                </button>
                
                <a class="navbar-brand" href="/">AcWing</a>
            </div>

            <!-- Items -->
            <div class="collapse navbar-collapse" id="topNavBar">
                <ul class="nav navbar-nav">
                    <li class=" active "><a href="/about/">首页</a></li>
                    <li id="navigation_activity_active_id" class=""><a href="/activity/">课程</a></li>
                    <li class=""><a href="/problem/">题库</a></li>
                    <li class="">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            更多
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li id="navigation_competition_active_id" class=""><a href="/activity/1/competition/">竞赛</a></li>
                            <li class=""><a href="/solution/">题解</a></li>
                            <li class=""><a href="/blog/">分享</a></li>

                            <li class=""><a href="/community/">问答</a></li>

                            <li class=""><a href="/file_system/file/content/whole/index/content/whole/application/1/">应用</a></li>
                        </ul>
                    </li>
                </ul>

                <ul class="nav navbar-nav navbar-right">
                    
                    <li class=""><a href="/app/version/download/index/">App</a></li>
                    
                        <li class=""><a href="/user/myspace/blog/add/273120/" title="创作">创作</a></li>
                        <li title="通知" class="">
                            <a href="/user/myspace/notification/1/">
                                <span class="glyphicon glyphicon-bell" style="font-size: 20px;"></span>
                                
                            </a>
                        </li>
                        <li>
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_sm_aa617d23a0.png" alt="风雪 的头像" style="margin: -5px;" width="35px">
                                &nbsp;
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <span style="cursor: pointer;" title="AC币">
                                        <img src="https://cdn.acwing.com/static/web/img/acb2.png"
                                             width="15px" alt="AC币图标"
                                             style="margin-left: 20px; margin-bottom: 4px;">
                                        &nbsp;
                                        <span class="hidden-sm hidden-md hidden-lg" style="color: white;">6.16</span>
                                        <span class="hidden-xs">6.16</span>
                                    </span>
                                </li>
                                <li class="divider"></li>
                                <li><a href = "/user/myspace/index/273120/">我的空间</a></li>
                                <li><a href = "/user/profile/index/">个人信息</a></li>
                                <li class="divider"></li>
                                <li id="navigation_public_group_active_id" class=""><a href="/activity/content/public_group/entry/">校园</a></li>
                                <li class="divider"></li>
                                <li><a href = "/user/payment/order/index/">我的订单</a></li>
                                <li><a href = "/user/work_sheet/index/">我的工单</a></li>
                                <li class = "divider"></li>
                                <li>
                                    <form id="signout-form" action="/user/account/signout/" method="post">
                                        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                                    </form>
                                    <a id="signout-link" style="cursor: pointer">退出</a>
                                    <script>
                                        $(document).ready(function (){
                                            $('#signout-link').click(function (){
                                                $('#signout-form').submit();
                                            });
                                        });
                                    </script>
                                </li>
                            </ul>
                        </li>
                    
                </ul>
            </div>
        </div>
    </nav>
    <div class="base_body">
    
        

<script>
    let GLOBAL_NEWS = {
        add_url: "/user/myspace/news/add/",
        get_upload_image_info_url: "/file_system/file/content/whole/index/content/whole/lib/aliyun/upload/image/get_info/",
        activity_id: 0,  // 0表示所有人可见
    };
</script>
<script src="https://cdn.acwing.com/static/web/js/file_system/file/content/whole/lib/aliyun/upload/aliyun-upload-sdk-1.5.0.min.js"></script>
<script src="https://cdn.acwing.com/static/web/js/file_system/file/content/whole/lib/aliyun/upload/es6-promise.min.js"></script>
<script src="https://cdn.acwing.com/static/web/js/file_system/file/content/whole/lib/aliyun/upload/aliyun-oss-sdk-5.3.1.min.js"></script>
<script src="https://cdn.acwing.com/static/web/js/file_system/file/content/whole/builtin/news/dist/ac_news-0.0.7.min.js"></script>


    <div class="container">
        <div class="row">
            <div class="col-xs-offset-0 col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-2 col-md-8">
                <div id="file-content-abstract-field-" class="panel panel-default about-index-file-panel" style="margin-bottom: 0;">
                    <div class="panel-body about-index-file-panel-body">
                        
                            <div>
                                <ul class="nav nav-tabs" style="font-size: 17px;">
                                    <li class="active" role="presentation">
                                        <a href="/about/recommended/" class="user-myspace-base-subtitle">推荐</a>
                                    </li>
                                    <li class=" " role="presentation">
                                        <a href="/about/followed/" class="user-myspace-base-subtitle active">关注</a>
                                    </li>
                                </ul>
                            </div>
                        
                        <div class="row" style="margin: 10px 0 0 0;">
                            <div class="col-xs-2 col-sm-1">
                                <a href="/user/myspace/index/273120/" target="_blank">
                                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" alt="风雪的头像" width="45px">
                                </a>
                            </div>
                            <div class="col-xs-10 col-sm-11">
                                <div class="add-news-text-field" data-toggle="modal" data-target="#modal-add-news">
                                    风雪，有什么新鲜事想告诉大家！
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


<div id="modal-add-news" class="modal fade" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <div class="text-center add-news-field-title">创建帖子</div>
                <hr style="margin: 10px 0 0 0;">
            </div>
            <div class="modal-body">
                <div class="my-info">
                    <div class="my-photo">
                        <a href="/user/myspace/index/273120/" target="_blank">
                            <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" alt="风雪的头像" width="40px">
                        </a>
                    </div>
                    <div class="my-username" style="position: relative; top: -5px;">
                        风雪
                    </div>
                    <div>
                        
                            <select class="add-news-edit-field-authorization">
                                <option value="all">所有人可见</option>
                            </select>
                        
                    </div>
                </div>
                <div class="add-news-edit-field-all">
                    <div class="add-news-edit-field" contenteditable="plaintext-only" data-text="风雪，分享你的新鲜事吧！"></div>
                    <div class="add-news-edit-field-photos"></div>
                </div>
                <div class="add-news-attachment">
                    <label for="add-news-upload-image" style="width: 100%; cursor: pointer;">
                        添加更多内容
                        <span class="attachment-photo glyphicon glyphicon-picture pull-right" title="添加图片"></span>
                        <input type="file" id="add-news-upload-image" style="display:none" multiple="multiple">
                    </label>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success add-news-field-submit-btn" data-dismiss="modal" disabled>
                    发帖
                </button>
            </div>
        </div> <!-- / .modal-content -->
    </div> <!-- / .modal-dialog -->
</div>
    
    <div id="overlay"></div>
    
    <div class="container">
        <div class="row">
            <div id="file_display_field" class="col-xs-offset-0 col-xs-12 col-sm-offset-2 col-sm-8 col-md-offset-2 col-md-8">
                
                    

<div id="file-content-abstract-field-11042106" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            题解
            <a href="/file_system/file/content/whole/index/content/11042106/" target="_blank"><span class="file-field-title pull-right">AcWing 896. 最长上升子序列 II</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/368735/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/368735_md_c38cd03cb3.jpg"
                        
                            alt="爱段宝的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/368735/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            爱段宝
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 10:29">
                    <span class="about-index-file-panel-time">5分钟前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11042106" class="file-content-field">
    <div class="main-martor main-martor-content" data-field-name="content">
        <div class="section-martor">
            <div id="file-martor-field-11042106" class="ui bottom attached tab active martor-preview" data-tab="preview-tab-content">
                <h2>栗子</h2>
<pre><code>例子：
1 9 10 11 12 2 3 4 5 6 7
得到：
st: 1
st: 1 9
st: 1 9 10
st: 1 9 10 11
st: 1 9 10 11 12
st: 1 2 10 11 12
st: 1 2 3  11 12
st: 1 2 3  4  12
st: 1 2 3  4  5
st: 1 2 3  4  5  6
st: 1 2 3  4  5  6  7

st中保存的是以st[i]为结尾的最长子序列的长度，只需要保证长度最长，不需要保证序列稳定。
新进来的元素要不就在末尾增加，要不就替换掉第一个大于等于他的元素。

替换第一个大于大于他的数的目的是：为了给未来做到更长铺好路。
如果是替换操作：说明我在保持以我为结尾的最长子序列不变的同时，可以让未来能够变得更长！
如果是加在末尾：说明以我为结尾，能够让最长的长度加1了！
上述的例子，从2开始就进行不断的替换，显然，到了6这个地方，就不再是替换了，而是增加了长度！这就是前面的2~5的替换，为6和7的到来铺好了路。
</code></pre>

<h2>库函数+容器</h2>
<pre><code>#include&lt;iostream&gt;
#include&lt;vector&gt;

using namespace std;

const int N = 100010;
int n;
int a[N];
vector&lt;int&gt; st; //模拟栈

int main()
{
    cin&gt;&gt;n;

    for(int i=0;i&lt;n;i++) cin&gt;&gt;a[i];

    //将数组中第一个元素入栈
    st.push_back(a[0]);

    for(int i=1;i&lt;n;i++)
    {
        //如果该元素大于栈顶元素，将该元素入栈
        if(a[i]&gt;st.back()) st.push_back(a[i]);
        //否则替换掉第一个大于或者等于这个数字的那个数
        else *lower_bound(st.begin(),st.end(),a[i])=a[i];
    }

    cout&lt;&lt;st.size();

    return 0;
}
</code></pre>

<h2>二分模板+模拟栈</h2>
<pre><code>#include&lt;iostream&gt;

using namespace std;

const int N = 100010;
int n;
int a[N];
int st[N],tt=0;

int main()
{
    cin&gt;&gt;n;

    for(int i=0;i&lt;n;i++) cin&gt;&gt;a[i];

    //方式1：tt=0的时候栈空
    //注意我们用这个的话栈底下标就变成1了，二分的l和r就要改变了，l为1，r为tt+1
    //方式2：tt=-1的时候栈空
    //注意我们用这个的话栈底下标就变成0了，二分的l和r就要改变了，l为0，r为tt，并且输出结果为tt+1
    st[++tt]=a[0];

    for(int i=1;i&lt;n;i++)
    {
        if(st[tt]&lt;a[i]) st[++tt]=a[i];
        else
        {

            int l=1,r=tt+1;
            while(l&lt;r)
            {
                int mid=l+r&gt;&gt;1;
                if(st[mid]&gt;=a[i]) r=mid;
                else l=mid+1;
            }
            st[l]=a[i];
        }
    }

    cout&lt;&lt;tt;

    return 0;
}
</code></pre>

<h2>参考文献</h2>
<p><a href="https://blog.csdn.net/qq_37529913/article/details/125139815?spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-125139815-blog-80150252.235%5Ev43%5Epc_blog_bottom_relevance_base4&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-125139815-blog-80150252.235%5Ev43%5Epc_blog_bottom_relevance_base4&amp;utm_relevant_index=1">CSDNC++ lower_bound() upper_bound() 函数用法详解</a></p>
            </div>
        </div><!-- end  /.section-martor -->
    </div>
</div>
<a id="file-content-filed-more-btn-11042106" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {

        $('#file-martor-field-11042106 > pre').each(function(i, block){
            hljs.highlightBlock(block);
        });

        let math_elemtnt = document.getElementById("file-martor-field-11042106");
        MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

        let $block = $("#file-content-field-11042106");
        let $btn =  $('#file-content-filed-more-btn-11042106');

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        $block.find("img").css("cursor", "pointer");

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11042106").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11042106" action="/file_system/file/operation/vote/up/11042106/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11042106').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11042106_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11042106_votecnt">
                
                    赞
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11042106').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11042106" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11042106">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11042106" class="form_collect" action="/file_system/file/operation/collect/add/11042106/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11042106').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11042106_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11042106_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11042106').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11042106" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11042106" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11042106/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11042106" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11042106').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11042106;
                    });
                    $('#comment_reply_form_top_11042106').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11042106" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11042106').click(function () {
                    let $comment_field = $("#comment_field_11042106");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11042106 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11042073" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            新鲜事
            <a href="/file_system/file/content/whole/index/content/11042073/" target="_blank"><span class="file-field-title pull-right">原文</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/373144/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/373144_md_4f49284972.jpg"
                        
                            alt="明月清风_818的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/373144/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            明月清风_818
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 10:22">
                    <span class="about-index-file-panel-time">12分钟前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11042073" class="file-content-field">
    <div class="tex2jax_ignore" style="white-space: pre-wrap; word-break: break-all; padding-right: 25px; margin-top: 10px;">AcWing《考研408-数据结构（上机）》拼团优惠！https://www.acwing.com/activity/content/introduction/3343/group_buy/193647/
    </div>
    <div class="news-photos">
        
    </div>
</div>
<a id="file-content-filed-more-btn-11042073" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {
        let $block = $("#file-content-field-11042073");
        let $btn =  $('#file-content-filed-more-btn-11042073');

        let $photos = $block.find('.news-photos').find('img');
        let w = 90;
        let cnt = $photos.length;
        if (cnt === 2 || cnt === 4) w /= 2;
        else if (cnt !== 1) w /= 3;
        for (let i = 0; i < $photos.length; i ++ ) {
            let $photo = $($photos[i]);
            $photo.width(w + "%");
            $photo.height($photo.width());
        }

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11042073").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11042073" action="/file_system/file/operation/vote/up/11042073/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11042073').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11042073_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11042073_votecnt">
                
                    1
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11042073').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11042073" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11042073">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11042073" class="form_collect" action="/file_system/file/operation/collect/add/11042073/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11042073').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11042073_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11042073_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11042073').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11042073" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11042073" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11042073/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11042073" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11042073').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11042073;
                    });
                    $('#comment_reply_form_top_11042073').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11042073" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11042073').click(function () {
                    let $comment_field = $("#comment_field_11042073");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11042073 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11042046" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            分享
            <a href="/file_system/file/content/whole/index/content/11042046/" target="_blank"><span class="file-field-title pull-right">Python3_区间DP</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/136362/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/136362_md_90b59edba6.jpg"
                        
                            alt="心牢的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/136362/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            心牢
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 10:14">
                    <span class="about-index-file-panel-time">20分钟前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11042046" class="file-content-field">
    <div class="main-martor main-martor-content" data-field-name="content">
        <div class="section-martor">
            <div id="file-martor-field-11042046" class="ui bottom attached tab active martor-preview" data-tab="preview-tab-content">
                <pre><code class="py">&quot;&quot;&quot;
区间DP

状态表示：
集合：F[i][j]表示从i到j这个区间合并的所有情况
属性：最小值

状态计算：
f[i][j]可以表示为f[i][k] + f[k][j]两个区间的最小值再加上[i, j]区间的值
因此需要枚举所有k的情况
并且区间求和需要用前缀和
&quot;&quot;&quot;
n = int(input())
a = list(map(int, input().strip().split()))
a.insert(0, 0)
# print(a)

s = [0 for _ in range(n + 1)]
for i in range(1, n + 1):
    s[i] = s[i - 1] + a[i]

# len是区间长度
# i是区间起点
# j是区间终点
# k是划分位置
f = [[float(&quot;inf&quot;)] * (n + 1) for _ in range(n + 1)]
for len in range(1, n + 1):
    for i in range(1, n - len + 2): # i + len - 1 &lt;= n
        j = i + len - 1
        # 当区间长度为1时，合并代价为0(边界条件)
        if len == 1:
            f[i][j] = 0
            continue
        for k in range(i, j):
            # k从i到j-1
            f[i][j] = min(f[i][j], f[i][k] + f[k + 1][j] + s[j] - s[i - 1])

print(f[1][n])
</code></pre>
            </div>
        </div><!-- end  /.section-martor -->
    </div>
</div>
<a id="file-content-filed-more-btn-11042046" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {

        $('#file-martor-field-11042046 > pre').each(function(i, block){
            hljs.highlightBlock(block);
        });

        let math_elemtnt = document.getElementById("file-martor-field-11042046");
        MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

        let $block = $("#file-content-field-11042046");
        let $btn =  $('#file-content-filed-more-btn-11042046');

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        $block.find("img").css("cursor", "pointer");

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11042046").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11042046" action="/file_system/file/operation/vote/up/11042046/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11042046').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11042046_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11042046_votecnt">
                
                    赞
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11042046').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11042046" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11042046">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11042046" class="form_collect" action="/file_system/file/operation/collect/add/11042046/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11042046').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11042046_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11042046_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11042046').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11042046" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11042046" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11042046/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11042046" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11042046').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11042046;
                    });
                    $('#comment_reply_form_top_11042046').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11042046" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11042046').click(function () {
                    let $comment_field = $("#comment_field_11042046");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11042046 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041986" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            题解
            <a href="/file_system/file/content/whole/index/content/11041986/" target="_blank"><span class="file-field-title pull-right">AcWing 90. 64位整数乘法</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/198323/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/198323_md_af97c01c31.jpg"
                        
                            alt="代码人生的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/198323/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            代码人生
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 10:03">
                    <span class="about-index-file-panel-time">31分钟前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041986" class="file-content-field">
    <div class="main-martor main-martor-content" data-field-name="content">
        <div class="section-martor">
            <div id="file-martor-field-11041986" class="ui bottom attached tab active martor-preview" data-tab="preview-tab-content">
                <h3>类似快速幂的做法，将a*b看成a个b相加，我们预处理出这些数据：</h3>
<h3><code>a mod p</code>,<code>2a mod p</code>,<code>4a mod p</code>&hellip;<code>2^k * a mod p</code></h3>
<h3>之后算出b的二进制表示，即可将对应位置为1的数加起来</h3>
<pre><code>#include &lt;cstdio&gt;
using namespace std;
typedef long long LL;
LL a,b,p;
LL quick_add(LL a,LL b,LL p){
    LL ans = 0;
    while(b){
        if(b &amp; 1) ans = (ans + a) % p;
        a = (a + a) % p;
        b &gt;&gt;= 1;
    }
    return ans;
}
int main()
{
    scanf(&quot;%lld %lld %lld&quot;,&amp;a,&amp;b,&amp;p);
    printf(&quot;%lld&quot;,quick_add(a,b,p));
    return 0;
}
</code></pre>
            </div>
        </div><!-- end  /.section-martor -->
    </div>
</div>
<a id="file-content-filed-more-btn-11041986" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {

        $('#file-martor-field-11041986 > pre').each(function(i, block){
            hljs.highlightBlock(block);
        });

        let math_elemtnt = document.getElementById("file-martor-field-11041986");
        MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

        let $block = $("#file-content-field-11041986");
        let $btn =  $('#file-content-filed-more-btn-11041986');

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        $block.find("img").css("cursor", "pointer");

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041986").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041986" action="/file_system/file/operation/vote/up/11041986/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041986').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041986_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041986_votecnt">
                
                    1
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041986').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041986" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041986">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041986" class="form_collect" action="/file_system/file/operation/collect/add/11041986/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041986').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041986_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041986_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041986').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041986" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041986" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041986/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041986" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041986').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041986;
                    });
                    $('#comment_reply_form_top_11041986').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041986" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041986').click(function () {
                    let $comment_field = $("#comment_field_11041986");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041986 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041955" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            新鲜事
            <a href="/file_system/file/content/whole/index/content/11041955/" target="_blank"><span class="file-field-title pull-right">原文</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/126278/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/126278_md_160fa0f9c1.png"
                        
                            alt="user.banned的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/126278/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            user.banned
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 09:52">
                    <span class="about-index-file-panel-time">42分钟前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041955" class="file-content-field">
    <div class="tex2jax_ignore" style="white-space: pre-wrap; word-break: break-all; padding-right: 25px; margin-top: 10px;">saber?
    </div>
    <div class="news-photos">
        
    </div>
</div>
<a id="file-content-filed-more-btn-11041955" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {
        let $block = $("#file-content-field-11041955");
        let $btn =  $('#file-content-filed-more-btn-11041955');

        let $photos = $block.find('.news-photos').find('img');
        let w = 90;
        let cnt = $photos.length;
        if (cnt === 2 || cnt === 4) w /= 2;
        else if (cnt !== 1) w /= 3;
        for (let i = 0; i < $photos.length; i ++ ) {
            let $photo = $($photos[i]);
            $photo.width(w + "%");
            $photo.height($photo.width());
        }

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041955").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041955" action="/file_system/file/operation/vote/up/11041955/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041955').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041955_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041955_votecnt">
                
                    2
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041955').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041955" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041955">
        
            2
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041955" class="form_collect" action="/file_system/file/operation/collect/add/11041955/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041955').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041955_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041955_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041955').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041955" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">2 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041955" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041955/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041955" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041955').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041955;
                    });
                    $('#comment_reply_form_top_11041955').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041955" class="comment_list_field">
    
        




<div id="comment_582331" style="padding-left: 0px;">
    
        <hr style="margin: 10px 0 10px 0;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 60px;">
            <a href = "/user/myspace/index/109870/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/109870_md_a73d131070.png" alt="用户头像" width="45px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/109870/" style="font-size: 15px;">
                    
                        incra
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 09:58">36分钟前</span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582331" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582331/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count">1</span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582331" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582331/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582331" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582331').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582331').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582331" class="comment-conent">
                <p>还不刷题，初中就没时间了。。。</p>
            </div>
            
                <form id="comment_reply_form_582331" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041955/582331/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582331" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582331").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582331").toggle(500);
                        });

                        
                        GLOBAL_COMMENT_SONS[582331] = [];

                        $('#comment_reply_submit_btn_582331').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041955;
                        });
                        $('#comment_reply_form_582331').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582331");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582331 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
        




<div id="comment_582330" style="padding-left: 0px;">
    
        <hr style="margin: 10px 0 10px 0;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 60px;">
            <a href = "/user/myspace/index/109870/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/109870_md_a73d131070.png" alt="用户头像" width="45px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/109870/" style="font-size: 15px;">
                    
                        incra
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 09:58">36分钟前</span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582330" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582330/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count">1</span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582330" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582330/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582330" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582330').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582330').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582330" class="comment-conent">
                <p>.</p>
            </div>
            
                <form id="comment_reply_form_582330" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041955/582330/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582330" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582330").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582330").toggle(500);
                        });

                        
                        GLOBAL_COMMENT_SONS[582330] = [];

                        $('#comment_reply_submit_btn_582330').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041955;
                        });
                        $('#comment_reply_form_582330').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582330");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582330 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
    
        
            <hr style="margin: 10px;" />
            <div class="file-abstract-field-comment-more">
                <a href="/file_system/file/content/whole/index/content/11041955/" target="_blank">查看更多评论</a>
            </div>
        
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041955').click(function () {
                    let $comment_field = $("#comment_field_11041955");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041955 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041786" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            新鲜事
            <a href="/file_system/file/content/whole/index/content/11041786/" target="_blank"><span class="file-field-title pull-right">原文</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/4377/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/4377_md_3b9215a193.jpg"
                        
                            alt="fan_zyf的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/4377/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            fan_zyf
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 08:14">
                    <span class="about-index-file-panel-time">2小时前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041786" class="file-content-field">
    <div class="tex2jax_ignore" style="white-space: pre-wrap; word-break: break-all; padding-right: 25px; margin-top: 10px;">AcWing《USACO Training辅导课》拼团优惠！https://www.acwing.com/activity/content/introduction/36/group_buy/193640/
    </div>
    <div class="news-photos">
        
    </div>
</div>
<a id="file-content-filed-more-btn-11041786" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {
        let $block = $("#file-content-field-11041786");
        let $btn =  $('#file-content-filed-more-btn-11041786');

        let $photos = $block.find('.news-photos').find('img');
        let w = 90;
        let cnt = $photos.length;
        if (cnt === 2 || cnt === 4) w /= 2;
        else if (cnt !== 1) w /= 3;
        for (let i = 0; i < $photos.length; i ++ ) {
            let $photo = $($photos[i]);
            $photo.width(w + "%");
            $photo.height($photo.width());
        }

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041786").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041786" action="/file_system/file/operation/vote/up/11041786/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041786').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041786_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041786_votecnt">
                
                    赞
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041786').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041786" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041786">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041786" class="form_collect" action="/file_system/file/operation/collect/add/11041786/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041786').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041786_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041786_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041786').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041786" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041786" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041786/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041786" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041786').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041786;
                    });
                    $('#comment_reply_form_top_11041786').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041786" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041786').click(function () {
                    let $comment_field = $("#comment_field_11041786");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041786 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041785" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            新鲜事
            <a href="/file_system/file/content/whole/index/content/11041785/" target="_blank"><span class="file-field-title pull-right">原文</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/4377/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/4377_md_3b9215a193.jpg"
                        
                            alt="fan_zyf的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/4377/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            fan_zyf
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 08:14">
                    <span class="about-index-file-panel-time">2小时前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041785" class="file-content-field">
    <div class="tex2jax_ignore" style="white-space: pre-wrap; word-break: break-all; padding-right: 25px; margin-top: 10px;">AcWing《Web应用课》拼团优惠！https://www.acwing.com/activity/content/introduction/1150/group_buy/193641/
    </div>
    <div class="news-photos">
        
    </div>
</div>
<a id="file-content-filed-more-btn-11041785" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {
        let $block = $("#file-content-field-11041785");
        let $btn =  $('#file-content-filed-more-btn-11041785');

        let $photos = $block.find('.news-photos').find('img');
        let w = 90;
        let cnt = $photos.length;
        if (cnt === 2 || cnt === 4) w /= 2;
        else if (cnt !== 1) w /= 3;
        for (let i = 0; i < $photos.length; i ++ ) {
            let $photo = $($photos[i]);
            $photo.width(w + "%");
            $photo.height($photo.width());
        }

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041785").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041785" action="/file_system/file/operation/vote/up/11041785/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041785').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041785_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041785_votecnt">
                
                    赞
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041785').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041785" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041785">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041785" class="form_collect" action="/file_system/file/operation/collect/add/11041785/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041785').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041785_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041785_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041785').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041785" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041785" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041785/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041785" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041785').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041785;
                    });
                    $('#comment_reply_form_top_11041785').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041785" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041785').click(function () {
                    let $comment_field = $("#comment_field_11041785");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041785 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041784" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            分享
            <a href="/file_system/file/content/whole/index/content/11041784/" target="_blank"><span class="file-field-title pull-right">信友队老师的“紧凑美”代码风格</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/338214/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/338214_md_0bddfb861c.jpg"
                        
                            alt="jack2012的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/338214/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            jack2012
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 08:13">
                    <span class="about-index-file-panel-time">2小时前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041784" class="file-content-field">
    <div class="main-martor main-martor-content" data-field-name="content">
        <div class="section-martor">
            <div id="file-martor-field-11041784" class="ui bottom attached tab active martor-preview" data-tab="preview-tab-content">
                <h3>信友队老师的代码风格：</h3>
<pre><code>#include&lt;bits/stdc++.h&gt;
using namespace std;
const int N=100010;
int a[N],s[N];
int main(){
    int n,m;
    cin&gt;&gt;n&gt;&gt;m;
    for(int i=1;i&lt;=n;i++)cin&gt;&gt;a[i];
    for(int i=1;i&lt;=n;i++)s[i]=s[i-1]+a[i];
    while (m--){
        int l,r;
        cin&gt;&gt;l&gt;&gt;r;
        cout&lt;&lt;s[r]-s[l-1]&lt;&lt;endl;
    }
    return 0;
}
</code></pre>
            </div>
        </div><!-- end  /.section-martor -->
    </div>
</div>
<a id="file-content-filed-more-btn-11041784" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {

        $('#file-martor-field-11041784 > pre').each(function(i, block){
            hljs.highlightBlock(block);
        });

        let math_elemtnt = document.getElementById("file-martor-field-11041784");
        MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

        let $block = $("#file-content-field-11041784");
        let $btn =  $('#file-content-filed-more-btn-11041784');

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        $block.find("img").css("cursor", "pointer");

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041784").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041784" action="/file_system/file/operation/vote/up/11041784/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041784').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041784_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041784_votecnt">
                
                    赞
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041784').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041784" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041784">
        
            3
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041784" class="form_collect" action="/file_system/file/operation/collect/add/11041784/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041784').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041784_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041784_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041784').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041784" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">3 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041784" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041784/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041784" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041784').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041784;
                    });
                    $('#comment_reply_form_top_11041784').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041784" class="comment_list_field">
    
        




<div id="comment_582334" style="padding-left: 0px;">
    
        <hr style="margin: 10px 0 10px 0;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 60px;">
            <a href = "/user/myspace/index/349255/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/349255_md_6dc60e5240.PNG" alt="用户头像" width="45px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/349255/" style="font-size: 15px;">
                    
                        BestMonkey
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 10:07">27分钟前</span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582334" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582334/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count"></span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582334" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582334/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582334" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582334').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582334').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582334" class="comment-conent">
                <p>你去**信友队？</p>
            </div>
            
                <form id="comment_reply_form_582334" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041784/582334/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582334" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582334").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582334").toggle(500);
                        });

                        
                        GLOBAL_COMMENT_SONS[582334] = [];

                        $('#comment_reply_submit_btn_582334').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041784;
                        });
                        $('#comment_reply_form_582334').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582334");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582334 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
        




<div id="comment_582335" style="padding-left: 50px;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 40px">
            <a href = "/user/myspace/index/338214/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/338214_md_0bddfb861c.jpg" alt="用户头像" width="30px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/338214/" style="font-size: 15px;">
                    
                        jack2012
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 10:08">26分钟前</span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582335" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582335/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count"></span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582335" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582335/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582335" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582335').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582335').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582335" class="comment-conent">
                <p>咋地</p>
            </div>
            
                <form id="comment_reply_form_582335" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041784/582335/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582335" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582335").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582335").toggle(500);
                        });

                        
                            GLOBAL_COMMENT_SONS[582334].push(582335);
                        
                        GLOBAL_COMMENT_SONS[582335] = [];

                        $('#comment_reply_submit_btn_582335').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041784;
                        });
                        $('#comment_reply_form_582335').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582335");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582335 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
        




<div id="comment_582336" style="padding-left: 50px;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 40px">
            <a href = "/user/myspace/index/349255/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/349255_md_6dc60e5240.PNG" alt="用户头像" width="30px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/349255/" style="font-size: 15px;">
                    
                        BestMonkey
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 10:09">25分钟前</span>
                
                    <span class="comment-title">
                        &nbsp;&nbsp;&nbsp;回复了
                        <a id="comment_link_582336" style="cursor:pointer;">
                            
                                jack2012 的评论
                            
                        </a>
                        <script>
                            $(document).ready(function () {
                                $('#comment_link_582336').click(function () {
                                    $('#comment_582335').effect('pulsate', 'slow');
                                    return false;
                                });
                            });
                        </script>
                    </span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582336" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582336/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count"></span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582336" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582336/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582336" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582336').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582336').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582336" class="comment-conent">
                <p>你们班主任是不是hlz</p>
            </div>
            
                <form id="comment_reply_form_582336" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041784/582336/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582336" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582336").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582336").toggle(500);
                        });

                        
                            GLOBAL_COMMENT_SONS[582335].push(582336);
                        
                        GLOBAL_COMMENT_SONS[582336] = [];

                        $('#comment_reply_submit_btn_582336').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041784;
                        });
                        $('#comment_reply_form_582336').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582336");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582336 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
    
        
            <hr style="margin: 10px;" />
            <div class="file-abstract-field-comment-more">
                <a href="/file_system/file/content/whole/index/content/11041784/" target="_blank">查看更多评论</a>
            </div>
        
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041784').click(function () {
                    let $comment_field = $("#comment_field_11041784");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041784 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041757" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            新鲜事
            <a href="/file_system/file/content/whole/index/content/11041757/" target="_blank"><span class="file-field-title pull-right">原文</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/384874/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/384874_md_452fd60386.jpg"
                        
                            alt="This_is_NTT的爹的小号哈哈哈哈哈哈哈的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/384874/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            This_is_NTT的爹的小号哈哈哈哈哈哈哈
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 07:50">
                    <span class="about-index-file-panel-time">2小时前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041757" class="file-content-field">
    <div class="tex2jax_ignore" style="white-space: pre-wrap; word-break: break-all; padding-right: 25px; margin-top: 10px;">6
    </div>
    <div class="news-photos">
        
    </div>
</div>
<a id="file-content-filed-more-btn-11041757" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {
        let $block = $("#file-content-field-11041757");
        let $btn =  $('#file-content-filed-more-btn-11041757');

        let $photos = $block.find('.news-photos').find('img');
        let w = 90;
        let cnt = $photos.length;
        if (cnt === 2 || cnt === 4) w /= 2;
        else if (cnt !== 1) w /= 3;
        for (let i = 0; i < $photos.length; i ++ ) {
            let $photo = $($photos[i]);
            $photo.width(w + "%");
            $photo.height($photo.width());
        }

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041757").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041757" action="/file_system/file/operation/vote/up/11041757/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041757').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041757_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041757_votecnt">
                
                    1
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041757').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041757" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041757">
        
            1
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041757" class="form_collect" action="/file_system/file/operation/collect/add/11041757/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041757').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041757_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041757_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041757').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041757" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">1 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041757" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041757/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041757" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041757').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041757;
                    });
                    $('#comment_reply_form_top_11041757').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041757" class="comment_list_field">
    
        




<div id="comment_582342" style="padding-left: 0px;">
    
        <hr style="margin: 10px 0 10px 0;">
    
    <div class="row">
        <div class="col-md-1 col-sm-2 col-xs-3"  style="max-width: 60px;">
            <a href = "/user/myspace/index/63721/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/63721_md_cb66fd815a.jpg" alt="用户头像" width="45px">
            </a>
        </div>
        <div class="col-md-11 col-sm-10 col-xs-9">
            <div>
                <a href="/user/myspace/index/63721/" style="font-size: 15px;">
                    
                        This_is_NTT
                    
                </a>
                &nbsp;
                <span class="comment-title" title="2024-02-07 10:27">7分钟前</span>
                
                &nbsp;&nbsp;
                
                    <span>
                        <a id="file-comment-vote-up-582342" data-comment-vote-up-url="/file_system/file/operation/comment/vote/up/582342/" class="file-comment-vote-up">
                            
                                <img class="file-comment-vote-up-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup.png" title="取消赞" alt="赞" style="display: none;">
                                <img class="file-comment-vote-up-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-empty.png" title="赞" alt="赞">
                                <img class="file-comment-vote-up-heart-gif" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/voteup-process-2.gif?id=1" title="赞" style="display: none;" alt="赞">
                            
                            &nbsp;
                            <span class="file-comment-vote-up-count"></span>
                        </a>
                         &nbsp;&nbsp;
                        <a id="file-comment-vote-down-582342" data-comment-vote-down-url="/file_system/file/operation/comment/vote/down/582342/" class="file-comment-vote-down">
                            
                                <img class="file-comment-vote-down-heart" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown.png" title="取消踩" alt="踩" style="display: none;">
                                <img class="file-comment-vote-down-heart-empty" src="https://cdn.acwing.com/static/web/img/file_system/file/operation/comment/votedown-empty.png" title="踩" alt="踩">
                            
                            &nbsp;
                        </a>
                         &nbsp;&nbsp;&nbsp;
                    </span>
                    <a id="comment_reply_btn_582342" class="comment-title hand-cursor file-comment-reply">回复</a>
                    <script>
                        $(document).ready(function () {
                            $('#file-comment-vote-up-582342').on("click", FILE_COMMENT_VOTE_UP_HANDLE_FUNCTION);
                            $('#file-comment-vote-down-582342').on("click", FILE_COMMENT_VOTE_DOWN_HANDLE_FUNCTION);

                        });
                    </script>
                
                
            </div>
            <div id="comment_content_582342" class="comment-conent">
                <p>你有意思吗</p>
            </div>
            
                <form id="comment_reply_form_582342" style="display: none;" class="comment_reply_form"
                      role="form" method="post" action="/file_system/file/operation/comment/add/11041757/582342/" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                    <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                        <button id="comment_reply_submit_btn_582342" class="form-control btn btn-link" style="border-radius: 5px">提交评论</button>
                    </div>
                </form>
                <script>
                    $(document).ready(function () {
                        $("#comment_reply_btn_582342").click(function () {
                            $(this).text(function(i, text){
                                  return text === "回复" ? "收起" : "回复";
                              });
                            $("#comment_reply_form_582342").toggle(500);
                        });

                        
                        GLOBAL_COMMENT_SONS[582342] = [];

                        $('#comment_reply_submit_btn_582342').click(function () {
                            GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041757;
                        });
                        $('#comment_reply_form_582342').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                    });
                </script>
            
        </div>
    </div>
    <script>
        $(document).ready(function () {
            let math_elemtnt = document.getElementById("comment_content_582342");
            MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

            $('#comment_content_582342 > pre').each(function(i, block){
                hljs.highlightBlock(block);
            });
        });
    </script>
</div>
        
    
    
        
            <hr style="margin: 10px;" />
            <div class="file-abstract-field-comment-more">
                <a href="/file_system/file/content/whole/index/content/11041757/" target="_blank">查看更多评论</a>
            </div>
        
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041757').click(function () {
                    let $comment_field = $("#comment_field_11041757");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041757 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
                    

<div id="file-content-abstract-field-11041754" class="panel panel-default about-index-file-panel file-content-abstract-page-flag">
    <div class="panel-body about-index-file-panel-body">
        <div class="about-index-file-type tex2jax_ignore">
            题解
            <a href="/file_system/file/content/whole/index/content/11041754/" target="_blank"><span class="file-field-title pull-right">AcWing 413. 乒乓球</span></a>
        </div>
        <hr style="margin: 0 0 10px 0;">
        <div class="row" style="margin: 0">
            <div class="col-xs-2 col-sm-1">
                <a href="/user/myspace/index/212592/" target="_blank">
                    <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/212592_md_a4da5ddd3f.jpg"
                        
                            alt="叶落孤城的头像"
                        
                        width="45px">
                </a>
            </div>
            <div class="col-xs-10 col-sm-11">
                <a href="/user/myspace/index/212592/" target="_blank">
                    <span class="about-index-file-panel-username">
                        
                            叶落孤城
                        
                    </span>
                </a>
                <br>
                <span title="2024-02-07 07:48">
                    <span class="about-index-file-panel-time">2小时前</span>
                </span>
            </div>
        </div>
        <div style="padding-left: 45px;">
            
                

<div id="file-content-field-11041754" class="file-content-field">
    <div class="main-martor main-martor-content" data-field-name="content">
        <div class="section-martor">
            <div id="file-martor-field-11041754" class="ui bottom attached tab active martor-preview" data-tab="preview-tab-content">
                <h3>模拟</h3>
<h4>C++ 代码</h4>
<pre><code>#include &lt;bits/stdc++.h&gt;
using namespace std;
void work(string x,int s){
    int a=0,b=0;
    for(int i=0;i&lt;x.size();i++){
        if(x[i]=='W')a++;
        else b++;
        if(max(a,b)&gt;=s and abs(a-b)&gt;=2){
            cout&lt;&lt;a&lt;&lt;&quot;:&quot;&lt;&lt;b&lt;&lt;endl;
            a=b=0;
        }
    }
    cout&lt;&lt;a&lt;&lt;&quot;:&quot;&lt;&lt;b&lt;&lt;endl;
}
int main(){
    string x;
    char c;
    while(cin&gt;&gt;c,c!='E') x+=c;
    work(x,11);
    cout&lt;&lt;endl;
    work(x,21);
    return 0;
}
</code></pre>
            </div>
        </div><!-- end  /.section-martor -->
    </div>
</div>
<a id="file-content-filed-more-btn-11041754" style="display: none; margin-left: -30px; cursor: pointer;">展开</a>
<script>
    $(document).ready(function () {

        $('#file-martor-field-11041754 > pre').each(function(i, block){
            hljs.highlightBlock(block);
        });

        let math_elemtnt = document.getElementById("file-martor-field-11041754");
        MathJax.Hub.Queue(["Typeset", MathJax.Hub, math_elemtnt]);

        let $block = $("#file-content-field-11041754");
        let $btn =  $('#file-content-filed-more-btn-11041754');

        $block.find("img").on('click', function() {
          $('#overlay')
            .css({backgroundImage: `url(${this.src})`})
            .addClass('open')
            .one('click', function() { $(this).removeClass('open'); });
        });

        $block.find("img").css("cursor", "pointer");

        let $max_height = 300;
        

        if ($block.height() >= $max_height){
           $btn.show();
        }
        $btn.click(function () {
            if ($(this).text() === "展开") {
                $block.animate({"max-height" : $block.prop("scrollHeight")});
                $(this).text("收起");
            } else {
                $([document.documentElement, document.body]).animate({
                    scrollTop: $("#file-content-abstract-field-11041754").offset().top - 55 - $(window).height() * 0.1
                });
                $block.animate({"max-height" : $max_height + "px"});
                $(this).text("展开");
            }
        });
    });
</script>
            
        </div>
        <hr style="margin: 10px 0 0 0;">
        <div class="btn-group btn-group-justified" role="group" style="padding-bottom: 5px;">
            <div class="btn-group" role="group">
                
    <form id="form_vote_11041754" action="/file_system/file/operation/vote/up/11041754/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="赞" onclick="$('#form_vote_11041754').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-heart-empty form_vote_11041754_heart" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_vote_11041754_votecnt">
                
                    1
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_vote_11041754').on("submit", GLOBAL_FILE_VOTE_UP_FUNCTION);
            });
        </script>
    </form>

            </div>
            <div class="btn-group" role="group">
                <a id="comment_field_btn_11041754" class="btn btn-link" title="评论">
    <span class="file_commentcnt glyphicon glyphicon-comment" style="top: 2px;"></span> &nbsp;
    <span id="file_commentcnt_11041754">
        
            评论
        
    </span>
</a>
            </div>
            <div class="btn-group" role="group">
                
    <form id="form_collect_11041754" class="form_collect" action="/file_system/file/operation/collect/add/11041754/" method="post">
        <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
        <a class="btn btn-link" title="收藏" onclick="$('#form_collect_11041754').submit();" style="cursor: pointer;">
            
                <span class="glyphicon glyphicon-star-empty form_collect_11041754_star" style="top: 2px;"></span>
            
            &nbsp;
            <span class="form_collect_11041754_collectcnt">
                
                    收藏
                
            </span>
        </a>
        <script>
            $(document).ready(function () {
                $('#form_collect_11041754').on("submit", GLOBAL_FILE_COLLECT_FUNCTION);
            });
        </script>
    </form>

            </div>
        </div>
        <hr style="margin: 0 0 10px 0;">
        
            <div id="comment_field_11041754" style="background-color: #f8f8f8; margin: -10px; padding: 10px; display: none;">
                

<h3 style="font-weight: normal; margin: 10px 0 30px 0;">0 评论</h3>
<div class="row">
    <div class="col-md-1 col-sm-2 col-xs-3">
        
            <a href = "/user/myspace/index/273120/">
                <img class="img-circle" src="https://cdn.acwing.com/media/user/profile/photo/273120_md_aa617d23a0.png" width="45px" alt="我的头像">
            </a>
        
    </div>
    
        <div class="col-md-11 col-sm-10 col-xs-9">
            <form id="comment_reply_form_top_11041754" class="comment_reply_form" role="form" method="post" action="/file_system/file/operation/comment/add/11041754/0/" enctype="multipart/form-data">
                <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                <textarea class="file-comment" name="content" cols="40" rows="2" maxlength="3000" required title="回复" placeholder="在这里写评论...（支持MarkDown和Latex语法）"></textarea>
                <div class="col-md-offset-10 col-md-2 col-sm-offset-9 col-sm-3 col-xs-offset-7 col-xs-5">
                    <button id="comment_reply_submit_btn_11041754" class="form-control btn btn-link" style="border-radius: 5px">
                        提交评论
                    </button>
                </div>
            </form>
            <script>
                $(document).ready(function () {
                    $('#comment_reply_submit_btn_11041754').click(function () {
                        GLOBAL_FILE_OPERATION_ADD_FILE_ID = 11041754;
                    });
                    $('#comment_reply_form_top_11041754').on("submit", GLOBAL_FILE_COMMENT_ADD_FUNCTION);
                })
            </script>
        </div>
    
</div>



<div id="comment_list_field_11041754" class="comment_list_field">
    
    
</div>
            </div>
        
        <script>
            $(document).ready(function () {
                $('#comment_field_btn_11041754').click(function () {
                    let $comment_field = $("#comment_field_11041754");
                    $comment_field.slideToggle(500, function () {
                        if ($comment_field.length > 0) {
                            $('#comment_reply_form_top_11041754 > textarea').focus();
                        }
                    });
                });
            });
        </script>
    </div>
</div>
                
            </div>
        </div>
    </div>




<div id="loading_file_gif" class="panel panel-default about-index-file-panel" style="background-color: #FFFFFF; display: none">
    <div class="panel-body about-index-file-panel-body">
        <div id="loading_gif">
            <img class="img-circle" src="https://cdn.acwing.com/static/web/gif/img_loading.gif"
                 width="80px"
                 alt="加载中" title="加载中" style="display: block; margin: 0 auto;" />
        </div>
    </div>
</div>
<div id="modal-danger" class="modal modal-message modal-danger fade" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <i class="glyphicon glyphicon-fire"></i>
            </div>
            <div class="modal-body">你确定删除吗？</div>
            <div class="modal-footer">
                <form id="modal_danger_delete_url" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" name="csrfmiddlewaretoken" value="6qf6p1YfnEVD4gp3dkdIdshwRx026WvuXnRnOKUWAXBHAdr6HKipfMr6bX7kqRVu">
                    <button class="btn" type="button" data-dismiss="modal">取消</button>
                    <button id="modal_danger_delete_url_btn" class="btn btn-danger" data-dismiss="modal" type="submit">
                        删除
                    </button>
                </form>
            </div>
        </div> <!-- / .modal-content -->
    </div> <!-- / .modal-dialog -->
</div>
</div>
    

<div id="1024-activity" style="position: fixed; top: 15vh; cursor: pointer; display: none; z-index:999999999">
    <div id="1024-activity-whole">
        <img id="1024-img" src="https://cdn.acwing.com/static/web/img/base/national_activity/20240128.png" width="80" alt="1024" style="border-radius: 5px">
        <div id="1024-close-btn" style="color: black; position: fixed; top: calc(15vh - 8px); left: 70px; cursor: pointer; font-size: 20px;">x</div>
    </div>
    <script>
        $(document).ready(function () {
            const start_date = 24, start_hours = 10;
            let $activity = $('#1024-activity');
            let $img = $('#1024-img');
            let $timer = $('#1024-timer');
            if (!((new Date()).getDate() < start_date || (new Date()).getDate() === start_date && (new Date()).getHours() < start_hours)) {
                $img.attr('src', "https://cdn.acwing.com/static/web/img/base/national_activity/20240128.png");
            }

            if (typeof(localStorage) !== "undefined") {
                let last_time = localStorage.getItem("1024-activity-last-close-time");
                let delta_time = Math.ceil((Date.now() - last_time) / 1000);

                if (delta_time < 6 * 3600) return false;  // 6小时内关闭过，则不再展示
            }

            if (typeof  not_show_banner === 'undefined')
                $activity.show("slide", { direction: "left" }, 200);
            if ((new Date()).getDate() < start_date || (new Date()).getDate() === start_date && (new Date()).getHours() < start_hours) {
                $timer.show();
            }

            let has_closed = false;
            let myeffect = function () {
                if (has_closed) return false;  // 如果已经关闭，则不再抖动
                setTimeout(function () {
                    $activity.effect("bounce", "slow", function () {
                        myeffect();
                    });
                }, 5000);  // 每5s循环一次
            };
            myeffect();

            let $close_btn = $('#1024-close-btn');
            $close_btn.click(function () {
                $activity.hide("slide", { direction: "left" }, 200);
                if (typeof(localStorage) !== "undefined") {
                    localStorage.setItem("1024-activity-last-close-time", Date.now());
                }
                return false;
            });
            $activity.click(function () {
                $activity.hide("slide", { direction: "left" }, 200);
                if (typeof(localStorage) !== "undefined") {
                    localStorage.setItem("1024-activity-last-close-time", Date.now());
                }
                window.open(/activity/, '_blank').focus();
            });

            let update_timer = function (time) {
                let secs = Math.ceil((Date.parse(time) - Date.now()) / 1000);
                let interval_function = function () {
                    if (secs <= 0) {
                        $timer.hide();
                        $img.attr('src', "https://cdn.acwing.com/static/web/img/base/national_activity/20240128.png");
                        return false;
                    }
                    let second = secs;
                    let hours = Math.floor(second / 3600);
                    second -= hours * 3600;
                    let minutes = Math.floor(second / 60);
                    second -= minutes * 60;

                    let $hour = $('#1024-timer-hour');
                    let $minute = $('#1024-timer-minute');
                    let $second = $('#1024-timer-second');

                    $hour.text(hours >= 10 ? hours: "0" + hours);
                    $minute.text(minutes >= 10 ? minutes : "0" + minutes);
                    $second.text(second >= 10 ? second : "0" + second);
                    secs -- ;
                };

                interval_function();
                setInterval(interval_function, 1000)
            };

            if ((new Date()).getDate() < start_date || (new Date()).getDate() === start_date && (new Date()).getHours() < start_hours) {
                update_timer("2023-10-24T00:00:00");
            }
        });
    </script>
</div>
    <footer id="acwing_footer" class="footer">
    <div class="container">
        <hr>
        <div class="row">
            <div class="col-sm-8 copyright">
                <span>
                    © 2018-2024 AcWing 版权所有
                    &nbsp;|&nbsp;
                    <a href="http://beian.miit.gov.cn/">京ICP备2021015969号-2</a>
                </span>
            </div>
            <div class="text-right col-sm-4 region-us">
                <div class="links">
                    <a href="/footer/agreement/">用户协议</a>
                    &nbsp;|&nbsp;
                    <a href="/footer/privacy_policy/">隐私政策</a>
                    &nbsp;|&nbsp;
                    <a href="/footer/faq/">常见问题</a>
                    &nbsp;|&nbsp;
                    <a href="/footer/contactus/">联系我们</a>
                </div>
            </div>
        </div>
    </div>
</footer>

</div>


    <div id="need-to-bandage-cell-phone-modal-warning" class="modal modal-message modal-warning fade" style="display: none;" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <i class="glyphicon glyphicon-warning-sign"></i>
                </div>
                <div class="modal-body">
                    该操作需要绑定手机号
                </div>
                <div class="modal-footer">
                    <a href="/user/profile/index/#security-cell-phone" class="btn btn-warning" target="_blank">去绑定</a>
                </div>
            </div> <!-- / .modal-content -->
        </div> <!-- / .modal-dialog -->
    </div>






<div id="modal-warning" class="modal modal-message modal-warning fade" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <i class="glyphicon glyphicon-warning-sign"></i>
            </div>
            <div id="warning_message_content" class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">OK</button>
            </div>
        </div> <!-- / .modal-content -->
    </div> <!-- / .modal-dialog -->
</div>


    

<script>
    let ABOUT_VIDEOJS_OPTIONS = {
            autoplay : false,
            controls : true,
            controlBar : {
            currentTimeDisplay : true,
            timeDivider : true,
            durationDisplay : true,
            remainingTimeDisplay : false,
            volumePanel : {
                inline : false,
                vertical : true
            }
        },
        preload : 'metadata',
    };
    let GLOBAL_FILE_COUNT = 10;
    
        let GLOBAL_PULL_FILES_URL = "/about/pull_files/";
    
</script>
<script src="https://cdn.acwing.com/static/web/js/about/pull_files-0.0.13.js"></script>




<script src="https://cdn.acwing.com/static/web/js/copy_with_link.js"></script>
<script>
    let article_author = "";
    if (article_author.length === 0) article_author = "AcWing";
    let VIDEO_CONTENT_WATERMARK_LOGO_URL = "https://cdn.acwing.com/static/web/img/32X32.ico";
</script>
<script src="https://cdn.acwing.com/static/plugins/js/highlight.min.js"></script>
<script type="text/x-mathjax-config">
        MathJax.Hub.Config({
          tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
          showMathMenu: false,
        });
</script>
<script type="text/javascript" src="https://cdn.acwing.com/static/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>
    $('pre').each(function(i, block){
        hljs.highlightBlock(block);
    });
</script>

    <script src="https://cdn.acwing.com/static/web/js/file_system/file/operation/collect/favorite-0.0.2.js"></script>
    <script src="https://cdn.acwing.com/static/web/js/file_system/file/operation/vote/vote-0.0.2.js"></script>
    <script type="text/javascript" src="https://cdn.acwing.com/static/web/js/file_system/file/operation/content/delete-0.0.5.js"></script>
    <script type="text/javascript" src="https://cdn.acwing.com/static/web/js/file_system/file/operation/comment/add-0.0.5.js"></script>
    <script type="text/javascript" src="https://cdn.acwing.com/static/web/js/file_system/file/operation/comment/delete-0.0.6.js"></script>
    <script type="text/javascript" src="https://cdn.acwing.com/static/web/js/file_system/file/operation/comment/vote-0.0.7.js"></script>
    <script src="https://cdn.acwing.com/static/web/js/file_system/file/content/abstract/vote-0.0.3.js"></script>
    <script src="https://cdn.acwing.com/static/web/js/file_system/file/content/abstract/collect-0.0.4.js"></script>

<script type="text/javascript" src="https://cdn.acwing.com/static/web/js/file_system/file/operation/comment/pull-0.0.6.js"></script>
<script>
    
    
    window.onbeforeunload = function (ev) {

        
            let windows = desktop_state.window.windows;
            for (let i = 0; i < windows.length; i ++ ) {  // 把所有未关闭的窗口关闭
                if (windows[i]) {
                    desktop_state.window.close(i);
                }
            }
        

        let notify = false;
        for (let i = 0; i < onbeforeunload_functions.length; i ++ ){
            let ret = onbeforeunload_functions[i]();
            if (ret){
                notify = true;
            }
        }
        if (notify){
            return true;
        }
    };

    let CLICK_URL = "/status/count/click/";
</script>
<script src="https://cdn.acwing.com/static/web/js/status/click.js"></script>

</body>
</html>